import BasicLayout from '@/layouts/BasicLayout.vue';


export default [
  {
    path: '/sys',
    component: BasicLayout,
    meta: { title: '系统管理' },
    children: [
      {
        path: '/sys/user',
        component: () => import('@/views/sys/user/index.vue'),
        meta: { title: '用户管理', menuCode: 'user' },
      },
      {
        path: '/sys/role',
        component: () => import('@/views/sys/role/index.vue'),
        meta: { title: '角色管理', menuCode: 'role' },
      },
      {
        path: '/sys/menu',
        component: () => import('@/views/sys/menu/index.vue'),
        meta: { title: '菜单管理', menuCode: 'menu' },
      },
      {
        path: '/sys/config',
        component: () => import('@/views/sys/config/index.vue'),
        meta: { title: '系统配置', },
      },
      {
        path: '/sys/login',
        component: () => import('@/views/sys/user/index.vue'),
        meta: { title: '登录日志', },
      },
      {
        path: '/sys/option',
        component: () => import('@/views/sys/user/index.vue'),
        meta: { title: '操作日志', },
      },
    ]
  },
  {
    path: '/job',
    component: BasicLayout,
    meta: { title: '调度中心' },
    children: [
      {
        path: '/job/localJob',
        component: () => import('@/views/job/local/index.vue'),
        meta: { title: '本地任务', menuCode: 'localJob' },
      },
    ]
  },
  {

    path: '/my',
    component: BasicLayout,
    meta: { title: '个人信息' },
    children: [
        {
          path: '/my/profile',
          component: () => import('@/views/my/profile/index.vue'),
          meta: { title: '我的资料' },
        }
    ]
  },
  {
    path: '/',
    redirect: '/workSpace'
  },
  {
    path: '/workspace',
    redirect: '/workspace/workbench',
    component: BasicLayout,
    meta: { title: '工作空间' },
    children: [
      {
        path: '/workspace/workbench',
        component: () => import('../../views/workSpace/workbench/index.vue'),
        meta: { title: '工作台', affix: true, closable: false },
      },
      {
        path: '/workspace/console',
        component: () => import('../../views/workSpace/console/index.vue'),
        meta: { title: '控制台', },
      },
      {
        path: '/workspace/analysis',
        component: () => import('../../views/workSpace/analysis/index.vue'),
        meta: { title: '分析页', },
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    meta: { title: '登录页面' },
  },
  {
    path: '/wx/bind/ok',
    component: () => import('../../views/sys/result/wx-bind-ok.vue'),
    meta: { title: '微信绑定成功页面' },
  },
  {
    path: '/wx/login/ok',
    component: () => import('../../views/sys/result/wx-login-ok.vue'),
    meta: { title: '微信登录成功页面' },
  },
  {
    path: '/wx/login/fail',
    component: () => import('../../views/sys/result/wx-login-fail.vue'),
    meta: { title: '微信登录失败页面' },
  },
  {
    path: '/wx/qr/overdue',
    component: () => import('../../views/sys/result/wx-qr-overdue.vue'),
    meta: { title: '微信二维码过期页面' },
  },
  {
    path: '/error',
    component: BasicLayout,
    meta: { title: '错误页面' },
    children: [
      {
        path: '/error/401',
        component: () => import('../../views/error/401.vue'),
        meta: { title: '401' },
      },
      {
        path: '/error/403',
        component: () => import('../../views/error/403.vue'),
        meta: { title: '403' },
      },
      {
        path: '/error/404',
        component: () => import('../../views/error/404.vue'),
        meta: { title: '404' },
      },
      {
        path: '/error/500',
        component: () => import('../../views/error/500.vue'),
        meta: { title: '500' },
      }
    ]
  },

]
